var k,l=this,
var aa = function(a) {
    a = a.split(".");
    for(var b=l,c;c=a.shift();) {
	if(null != b[c]) b = b[c];
	else return null;
    }
    return b
}
var getType=function(a) {
    var b=typeof a;
    if("object"==b) {
	if(a) {
	    if (a instanceof Array)return"array";
	    if (a instanceof Object)return b;
	    var c=Object.prototype.toString.call(a);
	    if("[object Window]"==c) return"object";
	    if("[object Array]"==c||
	       "number"==typeof a.length&&
	       "undefined"!=typeof a.splice&&
	       "undefined"!=typeof a.propertyIsEnumerable&&
	       !a.propertyIsEnumerable("splice"))return"array";
	    if("[object Function]"==c||
	       "undefined"!=typeof a.call&&
	       "undefined"!=typeof a.propertyIsEnumerable&&
	       !a.propertyIsEnumerable("call"))return"function"
	}
	else return"null";
    }
    else if("function"==b&&"undefined"==typeof a.call)return"object";
    return b
};
var isArray=function(a){ return"array"==getType(a)}
var isArrayObject=function(a) {
    var b=getType(a);
    return"array"==b||"object"==b&&"number"==typeof a.length
}
var p=function(a){ return"string"==typeof a}
var ca=function(a){
    var b=typeof a;
    return"object"==b&&null!=a||"function"==b
}
var da=function(a,b,c){
    return a.call.apply(a.bind,arguments)}
var fa=function(a,b,c){
    if(!a)throw Error();
    if(2<arguments.length){
	var d=Array.prototype.slice.call(arguments,2);
	return function(){
	    var c=Array.prototype.slice.call(arguments);
	    Array.prototype.unshift.apply(c,d);
	    return a.apply(b,c)}
    }
    return function(){
	return a.apply(b,arguments)}
}
var q=function(a,b,c){
    q=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?da:fa;
    return q.apply(null,arguments)}
var ga=Date.now||function(){
    return+new Date}
var r=function(a,b){ 
    function c(){  }
    c.prototype=b.prototype;
    a.ob=b.prototype;
    a.prototype=new c;
    a.prototype.constructor=a;
    a.ub=function(a,c,f){
	return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}
};
Function.prototype.bind=Function.prototype.bind||function(a,b){
    if(1<arguments.length){
	var c=Array.prototype.slice.call(arguments,1);
	c.unshift(this,a);
	return q.apply(null,c)}
    return q(this,a)
};
var s=function(a){
    if(Error.captureStackTrace)Error.captureStackTrace(this,s);
    else{
	var b=Error().stack;
	b&&(this.stack=b)}
    a&&(this.message=String(a))
};
r(s,Error);
s.prototype.name="CustomError";
var ha;
var ia=function(a,b){
    return 0==t(b,a.substr(0,b.length))
}
var u=function(a,b){
    return 0==t(b,a.substr(a.length-b.length,b.length))
};
var ja=function(a,b){
    for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);
	e.length&&1<c.length;
       )d+=c.shift()+e.shift();
    return d+c.join("%s")};
var t=function(a,b){
    var c=String(a).toLowerCase(),d=String(b).toLowerCase();
    return c<d?-1:c==d?0:1};
var qa=function(a){
    if(!ka.test(a))return a;
	-1!=a.indexOf("&")&&(a=a.replace(la,"&amp;"));
	-1!=a.indexOf("<")&&(a=a.replace(ma,"&lt;"));

	-1!=a.indexOf(">")&&(a=a.replace(na,"&gt;"));
	-1!=a.indexOf('"')&&(a=a.replace(oa,"&quot;"));
	-1!=a.indexOf("'")&&(a=a.replace(pa,"&#39;"));
    return a
}
var la=/&/g,ma=/</g,na=/>/g,oa=/"/g,pa=/'/g,ka=/[&<>"']/;
var ra=function(a){
    a=String(a);
    var b=a.indexOf(".");
	-1==b&&(b=a.length);
    b=Math.max(0,2-b);
    return Array(b+1).join("0")+a
}
var sa=function(a,b){
    return a<b?-1:a>b?1:0}
;
var ta=function(a,b){
    b.unshift(a);
    s.call(this,ja.apply(null,b));
    b.shift()};
r(ta,s);
ta.prototype.name="AssertionError";
var v=function(a,b,c){
    if(!a){
	var d="Assertion failed";
	if(b)var d=d+(": "+b),e=Array.prototype.slice.call(arguments,2);
	throw new ta(""+d,e||[]);
    }
}
var ua=function(a,b){
    throw new ta("Failure"+(a?": "+a:""),
		 Array.prototype.slice.call(arguments,1));
};
var va=function(){
    this.Da=ga()}
var wa=new va;
va.prototype.set=function(a){
    this.Da=a
};
va.prototype.reset=function(){
    this.set(ga())
};
va.prototype.get=function(){
    return this.Da};
var xa=function(a){
    this.$a=a||"";
    this.ab=wa};
k=xa.prototype;
k.bb=!0;
k.qa=!0;
k.eb=!0;
k.cb=!0;
k.ra=!1;
k.fb=!1;
var w=function(a){
    return 10>a?"0"+a:String(a)}
var ya=function(a,b){
    var c=(a.ta-b)/1E3,d=c.toFixed(3),e=0;
    if(1>c)e=2;
    else for(;
	     100>c;
	    )e++,c*=10;
    for(;
	0<e--;
       )d=" "+d;
    return d}
,za=function(a){
    xa.call(this,a)}
;
r(za,xa);
var x=Array.prototype,Aa=x.indexOf?function(a,b,c){
    v(null!=a.length);
    return x.indexOf.call(a,b,c)}
:function(a,b,c){
    c=null==c?0:0>c?Math.max(0,a.length+c):c;
    if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;
    for(;
	c<a.length;
	c++)if(c in a&&a[c]===b)return c;
    return-1}
,Ba=x.forEach?function(a,b,c){
    v(null!=a.length);
    x.forEach.call(a,b,c)}
:function(a,b,c){
    for(var d=a.length,e=p(a)?a.split(""):a,f=0;
	f<d;
	f++)f in e&&b.call(c,e[f],f,a)}
,Ca=x.filter?function(a,b,c){
    v(null!=a.length);
    return x.filter.call(a,
			 b,c)}
:function(a,b,c){
    for(var d=a.length,e=[],f=0,h=p(a)?a.split(""):a,g=0;
	g<d;
	g++)if(g in h){
	    var A=h[g];
	    b.call(c,A,g,a)&&(e[f++]=A)}
    return e}
,Da=function(a){
    return x.concat.apply(x,arguments)}
,Ea=function(a){
    var b=a.length;
    if(0<b){
	for(var c=Array(b),d=0;
	    d<b;
	    d++)c[d]=a[d];
	return c}
    return[]}
,Fa=function(a,b,c){
    v(null!=a.length);
    return 2>=arguments.length?x.slice.call(a,b):x.slice.call(a,b,c)}
;
var Ga="StopIteration"in l?l.StopIteration:Error("StopIteration"),Ha=function(){
}
;
Ha.prototype.next=function(){
    throw Ga;
}
;
Ha.prototype.qb=function(){
    return this}
;
var Ia=function(a,b){
    for(var c in a)b.call(void 0,a[c],c,a)}
,Ja=function(a){
    var b=[],c=0,d;
    for(d in a)b[c++]=a[d];
    return b}
,Ka=function(a){
    var b=[],c=0,d;
    for(d in a)b[c++]=d;
    return b}
,La=function(a){
    for(var b in a)return!1;
    return!0}
,Ma="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Na=function(a,b){
    for(var c,d,e=1;
	e<arguments.length;
	e++){
	d=arguments[e];
	for(c in d)a[c]=d[c];
	for(var f=0;
	    f<Ma.length;
	    f++)c=Ma[f],Object.prototype.hasOwnProperty.call(d,
							     c)&&(a[c]=d[c])}
}
;
var y=function(a,b){
    this.k={};
    this.d=[];
    this.O=this.f=0;
    var c=arguments.length;
    if(1<c){
	if(c%2)throw Error("Uneven number of arguments");
	for(var d=0;  d<c; d+=2)this.set(arguments[d],arguments[d+1])}
    else if(a){
	a instanceof y?(c=a.u(),d=a.l()):(c=Ka(a),d=Ja(a));
	for(var e=0;e<c.length; e++)
	    this.set(c[e],d[e]);
    }
};
y.prototype.l=function(){
    Oa(this);
    for(var a=[],b=0;b<this.d.length;b++) a.push(this.k[this.d[b]]);
    return a;
};
y.prototype.u=function(){
    Oa(this);
    return this.d.concat();
};

y.prototype.H=function(a){
    return z(this.k,a);
};
y.prototype.remove=function(a){
    return z(this.k,a)?
	(delete this.k[a], 
	 this.f--,
	 this.O++,
	 this.d.length > 2 * this.f && 
	 Oa(this),!0):
	!1;
};
var Oa=function(a){
    if(a.f!=a.d.length){
	for(var b=0,c=0; b<a.d.length; ){
	    var d=a.d[b];
	    z(a.k,d)&&(a.d[c++]=d);
	    b++;
	}
	a.d.length=c;
    }
    if(a.f!=a.d.length){
	for(var e={}  ,c=b=0;  b<a.d.length; )
	    d=a.d[b],z(e,d)||(a.d[c++]=d,e[d]=1),b++;
	a.d.length=c;
    }
};
y.prototype.get=function(a,b){ return z(this.k,a)?this.k[a]:b};

y.prototype.set=function(a,b){ 
    z(this.k,a)||(this.f++,this.d.push(a),this.O++);
    this.k[a]=b;
};
y.prototype.F=function() {
    return new y(this);
};
y.prototype.qb=function(a) {
    Oa(this);
    var b=0,c=this.d,d=this.k,e=this.O,f=this,h=new Ha;
    h.next=function(){
	for(; ; ){
	    if(e!=f.O)
		throw Error("The map has changed since the iterator was created");
	    if(b>=c.length)throw Ga;
	    var g=c[b++];
	    return a?g:d[g]}
    };
    return h;
};
var z=function(a,b){
    return Object.prototype.hasOwnProperty.call(a,b);
};
var Pa=function(a){
    if("function"==typeof a.l)return a.l();
    if(p(a))return a.split("");
    if(isArrayObject(a)){
	for(var b=[],c=a.length,d=0;  d<c; d++) b.push(a[d]);
	return b;
    }
    return Ja(a);
}
var Qa=function(a,b,c){
    if("function"==typeof a.forEach) a.forEach(b,c);
    else if(isArrayObject(a)||p(a))  Ba(a,b,c);
    else{
	var d;
	if("function"==typeof a.u)d=a.u();
	else if("function"!=typeof a.l) {
	    if(isArrayObject(a)||p(a)){
		d=[];
		for(var e=a.length,f=0; f<e;f++)d.push(f);
	    }
	    else d=Ka(a);
	}
	else 
	    d=void 0;
	for(var e=Pa(a),f=e.length,h=0;  h<f; h++)
	    b.call(c,e[h],d&&d[h],a);
    }
};
var B,Ra,Sa,Ta;
var Ua=function(){
    return l.navigator?l.navigator.userAgent:null;
};
Ta=Sa=Ra=B=!1;
var Va;
if(Va=Ua()){
    var Wa=l.navigator;
    B=0==Va.lastIndexOf("Opera",0);
    Ra=!B&&(-1!=Va.indexOf("MSIE")||-1!=Va.indexOf("Trident"));
    Sa=!B&&-1!=Va.indexOf("WebKit");
    Ta=!B&&!Sa&&!Ra&&"Gecko"==Wa.product}
var Xa=B,D=Ra,E=Ta,F=Sa;
var Ya=function(){
    var a=l.document;
    return a?a.documentMode:void 0}
var Za;

i:{
    var $a="",ab;
    if(Xa&&l.opera)var bb=l.opera.version,$a="function"==typeof bb?bb():bb;
    else if(E?ab=/rv\:([^\);
]+)(\)|;
)/:D?ab=/\b(?:MSIE|rv)[: ]([^\);
]+)(\)|;
)/:F&&(ab=/WebKit\/(\S+)/),ab)var cb=ab.exec(Ua()),$a=cb?cb[1]:"";
    if(D){
	var db=Ya();
	if(db>parseFloat($a)){
	    Za=String(db);
	    break i}
    }
    Za=$a}

var eb=Za,fb={
};
var G=function(a){
    var b;
    if(!(b=fb[a])){
	b=0;
	for(var c=String(eb).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),
	    d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),
	    e=Math.max(c.length,d.length),f=0;
	    0==b&&f<e;
	    f++){
	    var h=c[f]||"";
	    var g=d[f]||"";
	    var A=RegExp("(\\d*)(\\D*)","g");
	    var ea=RegExp("(\\d*)(\\D*)","g");
	    do{
		var C=A.exec(h)||["","",""],N=ea.exec(g)||["","",""];
		if(0==C[0].length&&0==N[0].length)break;
		b = sa(0==C[1].length?0:
		       parseInt(C[1],10),0==N[1].length?0:
		       parseInt(N[1],10))||sa(0==C[2].length,
					      0==N[2].length)
		    ||sa(C[2],N[2]);
	    }
	    while(0==b);
	}
	b=fb[a]=0<=b}
    return b;
}
var gb = l.document,hb=gb&&D?Ya()||("CSS1Compat"==gb.compatMode?parseInt(eb,10):5):void 0;
var jb=function(a){
    return ib(a||arguments.callee.caller,[])}
,ib=function(a,b){
    var c=[];
    if(0<=Aa(b,a))c.push("[...circular reference...]");
    else if(a&&50>b.length){
	c.push(kb(a)+"(");
	for(var d=a.arguments,e=0;
	    d&&e<d.length;
	    e++){
	    0<e&&c.push(", ");
	    var f;
	    f=d[e];
	    switch(typeof f){
	    case "object":f=f?"object":"null";
		break;
	    case "string":break;
	    case "number":f=String(f);
		break;
	    case "boolean":f=f?"true":"false";
		break;
	    case "function":f=(f=kb(f))?f:"[fn]";
		break;
	    default:f=typeof f}
	    40<f.length&&(f=f.substr(0,40)+"...");

	    c.push(f)}
	b.push(a);
	c.push(")\n");
	try{
	    c.push(ib(a.caller,b))}
	catch(h){
	    c.push("[exception trying to get caller]\n")}
    }
    else a?c.push("[...long stack...]"):c.push("[end]");
    return c.join("")}
,kb=function(a){
    if(lb[a])return lb[a];
    a=String(a);
    if(!lb[a]){
	var b=/function ([^\(]+)/.exec(a);
	lb[a]=b?b[1]:"[Anonymous]"}
    return lb[a]}
,lb={
}
;
var H=function(a,b,c,d,e){
    this.reset(a,b,c,d,e)}
;
H.prototype.aa=null;
H.prototype.$=null;
var mb=0;
H.prototype.reset=function(a,b,c,d,e){
    "number"==typeof e||mb++;
    this.ta=d||ga();
    this.r=a;
    this.oa=b;
    this.sa=c;
    delete this.aa;
    delete this.$}
;
H.prototype.ca=function(){
    return this.r}
;
H.prototype.Ea=function(a){
    this.r=a}
;
var I=function(a){
    this.gb=a;
    this.C=this.ea=this.r=this.q=null}
,J=function(a,b){
    this.name=a;
    this.value=b}
;
J.prototype.toString=function(){
    return this.name}
;
var nb=new J("SHOUT",1200),ob=new J("SEVERE",1E3),pb=new J("WARNING",900),qb=new J("INFO",800),rb=new J("CONFIG",700);
I.prototype.getParent=function(){
    return this.q}
;
I.prototype.Aa=function(){
    this.ea||(this.ea={
    }
	     );
    return this.ea}
;
I.prototype.Ea=function(a){
    this.r=a}
;
I.prototype.ca=function(){
    return this.r}
;

var sb=function(a){
    if(a.r)return a.r;
    if(a.q)return sb(a.q);
    ua("Root logger has no level set.");
    return null}
;
I.prototype.log=function(a,b,c){
    if(a.value>=sb(this).value)for("function"==getType(b)&&(b=b()),a=this.nb(a,b,c),b="log:"+a.oa,l.console&&(l.console.timeStamp?l.console.timeStamp(b):l.console.markTimeline&&l.console.markTimeline(b)),l.msWriteProfilerMark&&l.msWriteProfilerMark(b),b=this;
				   b;
				  ){
	c=b;
	var d=a;
	if(c.C)for(var e=0,f=void 0;
		   f=c.C[e];
		   e++)f(d);
	b=b.getParent()}
}
;

I.prototype.nb=function(a,b,c){
    var d=new H(a,String(b),this.gb);
    if(c){
	d.aa=c;
	var e;
	var f=arguments.callee.caller;
	try{
	    var h;
	    var g=aa("window.location.href");
	    if(p(c))h={
		message:c,name:"Unknown error",lineNumber:"Not available",fileName:g,stack:"Not available"}
	    ;
	    else{
		var A,ea,C=!1;
		try{
		    A=c.lineNumber||c.tb||"Not available"}
		catch(N){
		    A="Not available",C=!0}
		try{
		    ea=c.fileName||c.filename||c.sourceURL||l.$googDebugFname||g}
		catch(bd){
		    ea="Not available",C=!0}
		h=!C&&c.lineNumber&&c.fileName&&c.stack&&c.message&&
		    c.name?c:{
			message:c.message||"Not available",name:c.name||"UnknownError",lineNumber:A,fileName:ea,stack:c.stack||"Not available"}
	    }
	    e="Message: "+qa(h.message)+'\nUrl: <a href="view-source:'+h.fileName+'" target="_new">'+h.fileName+"</a>\nLine: "+h.lineNumber+"\n\nBrowser stack:\n"+qa(h.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+qa(jb(f)+"-> ")}
	catch(Ac){
	    e="Exception trying to expose exception! You win, we lose. "+Ac}
	d.$=e}
    return d}
;
I.prototype.info=function(a,b){
    this.log(qb,a,b)}
;

var tb={
}
,ub=null,vb=function(){
    ub||(ub=new I(""),tb[""]=ub,ub.Ea(rb))}
,wb=function(a){
    vb();
    var b;
    if(!(b=tb[a])){
	b=new I(a);
	var c=a.lastIndexOf("."),d=a.substr(c+1),c=wb(a.substr(0,c));
	c.Aa()[d]=b;
	b.q=c;
	tb[a]=b}
    return b}
;
var xb=function(){
    this.Fa=q(this.lb,this);
    this.ba=new za;
    this.ba.qa=!1;
    this.ia=this.ba.ra=!1;
    this.pa="";
    this.Za={
    }
}
;

xb.prototype.lb=function(a){
    if(!this.Za[a.sa]){
	var b;
	b=this.ba;
	var c=[];
	c.push(b.$a," ");
	if(b.qa){
	    var d=new Date(a.ta);
	    c.push("[",w(d.getFullYear()-2E3)+w(d.getMonth()+1)+w(d.getDate())+" "+w(d.getHours())+":"+w(d.getMinutes())+":"+w(d.getSeconds())+"."+w(Math.floor(d.getMilliseconds()/10)),"] ")}
	b.eb&&c.push("[",ya(a,b.ab.get()),"s] ");
	b.cb&&c.push("[",a.sa,"] ");
	b.fb&&c.push("[",a.ca().name,"] ");
	c.push(a.oa);
	b.ra&&a.aa&&c.push("\n",a.$);
	b.bb&&c.push("\n");
	b=c.join("");
	if(c=yb)switch(a.ca()){
	case nb:zb(c,
		   "info",b);
	    break;
	case ob:zb(c,"error",b);
	    break;
	case pb:zb(c,"warn",b);
	    break;
	default:zb(c,"debug",b)}
	else window.opera?window.opera.postError(b):this.pa+=b}
}
;
var Ab=null,yb=window.console,zb=function(a,b,c){
    if(a[b])a[b](c);
    else a.log(c)}
;
var Bb=function(a){
    Bb[" "](a);
    return a}
;
Bb[" "]=function(){
}
;
var Cb=!D||D&&9<=hb,Db=D&&!G("9");
!F||G("528");
E&&G("1.9b")||D&&G("8")||Xa&&G("9.5")||F&&G("528");
E&&!G("8")||D&&G("9");
var Eb=function(){
}
;
Eb.prototype.va=!1;
var K=function(a,b){
    this.type=a;
    this.currentTarget=this.target=b;
    this.defaultPrevented=this.A=!1;
    this.ua=!0}
;
K.prototype.preventDefault=function(){
    this.defaultPrevented=!0;
    this.ua=!1}
;
var Fb=function(a,b){
    K.call(this,a?a.type:"");
    this.relatedTarget=this.currentTarget=this.target=null;
    this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;
    this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;
    this.Ba=this.state=null;
    if(a){
	var c=this.type=a.type;
	this.target=a.target||a.srcElement;
	this.currentTarget=b;
	var d=a.relatedTarget;
	if(d){
	    if(E){
		var e;
		i:{
		    try{
			Bb(d.nodeName);
			e=!0;
			break i}
		    catch(f){
		    }
		    e=!1}
		e||(d=null)}
	}
	else"mouseover"==
	    c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);
	this.relatedTarget=d;
	this.offsetX=F||void 0!==a.offsetX?a.offsetX:a.layerX;
	this.offsetY=F||void 0!==a.offsetY?a.offsetY:a.layerY;
	this.clientX=void 0!==a.clientX?a.clientX:a.pageX;
	this.clientY=void 0!==a.clientY?a.clientY:a.pageY;
	this.screenX=a.screenX||0;
	this.screenY=a.screenY||0;
	this.button=a.button;
	this.keyCode=a.keyCode||0;
	this.charCode=a.charCode||("keypress"==c?a.keyCode:0);
	this.ctrlKey=a.ctrlKey;
	this.altKey=a.altKey;
	this.shiftKey=a.shiftKey;
	this.metaKey=
	    a.metaKey;
	this.state=a.state;
	this.Ba=a;
	a.defaultPrevented&&this.preventDefault()}
}
;
r(Fb,K);
Fb.prototype.preventDefault=function(){
    Fb.ob.preventDefault.call(this);
    var a=this.Ba;
    if(a.preventDefault)a.preventDefault();
    else if(a.returnValue=!1,Db)try{
	if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}
    catch(b){
    }
}
;
var Gb="closure_listenable_"+(1E6*Math.random()|0),Hb=function(a){
    try{
	return!(!a||!a[Gb])}
    catch(b){
	return!1}
}
,Ib=0;
var Jb=function(a,b,c,d,e){
    this.o=a;
    this.U=null;
    this.src=b;
    this.type=c;
    this.N=!!d;
    this.Q=e;
    this.key=++Ib;
    this.v=this.P=!1}
,Kb=function(a){
    a.v=!0;
    a.o=null;
    a.U=null;
    a.src=null;
    a.Q=null}
;
var L=function(a){
    this.src=a;
    this.i={
    }
    ;
    this.X=0}
;
L.prototype.add=function(a,b,c,d,e){
    var f=this.i[a];
    f||(f=this.i[a]=[],this.X++);
    var h=Lb(f,b,d,e);
	-1<h?(a=f[h],c||(a.P=!1)):(a=new Jb(b,this.src,a,!!d,e),a.P=c,f.push(a));
    return a}
;
L.prototype.remove=function(a,b,c,d){
    if(!(a in this.i))return!1;
    var e=this.i[a];
    b=Lb(e,b,c,d);
    return-1<b?(Kb(e[b]),v(null!=e.length),x.splice.call(e,b,1),0==e.length&&(delete this.i[a],this.X--),!0):!1}
;

var Mb=function(a,b){
    var c=b.type;
    if(c in a.i){
	var d=a.i[c],e=Aa(d,b),f;
	if(f=0<=e)v(null!=d.length),x.splice.call(d,e,1);
	f&&(Kb(b),0==a.i[c].length&&(delete a.i[c],a.X--))}
}
;
L.prototype.K=function(a,b,c,d){
    a=this.i[a];
    var e=-1;
    a&&(e=Lb(a,b,c,d));
    return-1<e?a[e]:null}
;
var Lb=function(a,b,c,d){
    for(var e=0;
	e<a.length;
	++e){
	var f=a[e];
	if(!f.v&&f.o==b&&f.N==!!c&&f.Q==d)return e}
    return-1}
;
var Nb="closure_lm_"+(1E6*Math.random()|0),M={
}
,Ob=0,Pb=function(a,b,c,d,e){
    if(isArray(b)){
	for(var f=0;
	    f<b.length;
	    f++)Pb(a,b[f],c,d,e);
	return null}
    c=Qb(c);
    if(Hb(a))a=a.da(b,c,d,e);
    else{
	if(!b)throw Error("Invalid event type");
	var f=!!d,h=Rb(a);
	h||(a[Nb]=h=new L(a));
	c=h.add(b,c,!1,d,e);
	c.U||(d=Sb(),c.U=d,d.src=a,d.o=c,a.addEventListener?a.addEventListener(b,d,f):a.attachEvent(b in M?M[b]:M[b]="on"+b,d),Ob++);
	a=c}
    return a}
,Sb=function(){
    var a=Tb,b=Cb?function(c){
	return a.call(b.src,b.o,c)}
    :function(c){
	c=a.call(b.src,
		 b.o,c);
	if(!c)return c}
    ;
    return b}
,Ub=function(a,b,c,d,e){
    if(isArray(b))for(var f=0;
		f<b.length;
		f++)Ub(a,b[f],c,d,e);
    else c=Qb(c),Hb(a)?a.V(b,c,d,e):a&&(a=Rb(a))&&(b=a.K(b,c,!!d,e))&&Vb(b)}
,Vb=function(a){
    if("number"!=typeof a&&a&&!a.v){
	var b=a.src;
	if(Hb(b))Mb(b.n,a);
	else{
	    var c=a.type,d=a.U;
	    b.removeEventListener?b.removeEventListener(c,d,a.N):b.detachEvent&&b.detachEvent(c in M?M[c]:M[c]="on"+c,d);
	    Ob--;
	    (c=Rb(b))?(Mb(c,a),0==c.X&&(c.src=null,b[Nb]=null)):Kb(a)}
    }
}
,Xb=function(a,b,c,d){
    var e=1;
    if(a=Rb(a))if(b=
		  a.i[b])for(b=Ea(b),a=0;
			     a<b.length;
			     a++){
		      var f=b[a];
		      f&&f.N==c&&!f.v&&(e&=!1!==Wb(f,d))}
    return Boolean(e)}
,Wb=function(a,b){
    var c=a.o,d=a.Q||a.src;
    a.P&&Vb(a);
    return c.call(d,b)}
,Tb=function(a,b){
    if(a.v)return!0;
    if(!Cb){
	var c=b||aa("window.event"),d=new Fb(c,this),e=!0;
	if(!(0>c.keyCode||void 0!=c.returnValue)){
	    i:{
		var f=!1;
		if(0==c.keyCode)try{
		    c.keyCode=-1;
		    break i}
		catch(h){
		    f=!0}
		if(f||void 0==c.returnValue)c.returnValue=!0}
	    c=[];
	    for(f=d.currentTarget;
		f;
		f=f.parentNode)c.push(f);
	    for(var f=a.type,g=c.length-
		1;
		!d.A&&0<=g;
		g--)d.currentTarget=c[g],e&=Xb(c[g],f,!0,d);
	    for(g=0;
		!d.A&&g<c.length;
		g++)d.currentTarget=c[g],e&=Xb(c[g],f,!1,d)}
	return e}
    return Wb(a,new Fb(b,this))}
,Rb=function(a){
    a=a[Nb];
    return a instanceof L?a:null}
,Yb="__closure_events_fn_"+(1E9*Math.random()>>>0),Qb=function(a){
    v(a,"Listener can not be null.");
    if("function"==getType(a))return a;
    v(a.handleEvent,"An object listener must have handleEvent method.");
    return a[Yb]||(a[Yb]=function(b){
	return a.handleEvent(b)}
		  )}
;
var Zb=!D||D&&9<=hb,$b=!E&&!D||D&&D&&9<=hb||E&&G("1.9.1");
D&&G("9");
var ac=function(a,b){
    var c;
    c=a.className;
    c=p(c)&&c.match(/\S+/g)||[];
    for(var d=Fa(arguments,1),e=c.length+d.length,f=c,h=0;
	h<d.length;
	h++)0<=Aa(f,d[h])||f.push(d[h]);
    a.className=c.join(" ");
    return c.length==e}
;
var cc=function(a,b){
    Ia(b,function(b,d){
	"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in bc?a.setAttribute(bc[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b}
      )}
,bc={
    cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"}
,ec=function(a,b,c){
    function d(c){
	c&&b.appendChild(p(c)?
			 a.createTextNode(c):c)}
    for(var e=2;
	e<c.length;
	e++){
	var f=c[e];
	!isArrayObject(f)||isFunction(f)&&0<f.nodeType?d(f):Ba(dc(f)?Ea(f):f,d)}
}
,dc=function(a){
    if(a&&"number"==typeof a.length){
	if(isFunction(a))return"function"==typeof a.item||"string"==typeof a.item;
	if("function"==getType(a))return"function"==typeof a.item}
    return!1}
,fc=function(a){
    this.ha=a||l.document||document}
;
k=fc.prototype;

k.ib=function(a,b,c){
    var d=this.ha,e=arguments,f=e[0],h=e[1];
    if(!Zb&&h&&(h.name||h.type)){
	f=["<",f];
	h.name&&f.push(' name="',qa(h.name),'"');
	if(h.type){
	    f.push(' type="',qa(h.type),'"');
	    var g={
	    }
	    ;
	    Na(g,h);
	    delete g.type;
	    h=g}
	f.push(">");
	f=f.join("")}
    f=d.createElement(f);
    h&&(p(h)?f.className=h:isArray(h)?ac.apply(null,[f].concat(h)):cc(f,h));
    2<e.length&&ec(d,f,e);
    return f}
;
k.createElement=function(a){
    return this.ha.createElement(a)}
;
k.createTextNode=function(a){
    return this.ha.createTextNode(String(a))}
;

k.appendChild=function(a,b){
    a.appendChild(b)}
;
k.Aa=function(a){
    return $b&&void 0!=a.children?a.children:Ca(a.childNodes,function(a){
	return 1==a.nodeType}
					       )}
;
var gc=function(a){
    this.G=a;
    this.d={
    }
}
;
r(gc,Eb);
var hc=[];
gc.prototype.da=function(a,b,c,d){
    isArray(b)||(hc[0]=b,b=hc);
    for(var e=0;
	e<b.length;
	e++){
	var f=Pb(a,b[e],c||this.handleEvent,d||!1,this.G||this);
	if(!f)break;
	this.d[f.key]=f}
    return this}
;
gc.prototype.V=function(a,b,c,d,e){
    if(isArray(b))for(var f=0;
		f<b.length;
		f++)this.V(a,b[f],c,d,e);
    else c=c||this.handleEvent,e=e||this.G||this,c=Qb(c),d=!!d,b=Hb(a)?a.K(b,c,d,e):a?(a=Rb(a))?a.K(b,c,d,e):null:null,b&&(Vb(b),delete this.d[b.key]);
    return this}
;

gc.prototype.handleEvent=function(){
    throw Error("EventHandler.handleEvent not implemented");
}
;
var O=function(){
    this.n=new L(this);
    this.mb=this}
;
r(O,Eb);
O.prototype[Gb]=!0;
k=O.prototype;
k.za=null;
k.addEventListener=function(a,b,c,d){
    Pb(this,a,b,c,d)}
;
k.removeEventListener=function(a,b,c,d){
    Ub(this,a,b,c,d)}
;

k.dispatchEvent=function(a){
    ic(this);
    var b,c=this.za;
    if(c){
	b=[];
	for(var d=1;
	    c;
	    c=c.za)b.push(c),v(1E3>++d,"infinite loop")}
    c=this.mb;
    d=a.type||a;
    if(p(a))a=new K(a,c);
    else if(a instanceof K)a.target=a.target||c;
    else{
	var e=a;
	a=new K(d,c);
	Na(a,e)}
    var e=!0,f;
    if(b)for(var h=b.length-1;
	     !a.A&&0<=h;
	     h--)f=a.currentTarget=b[h],e=jc(f,d,!0,a)&&e;
    a.A||(f=a.currentTarget=c,e=jc(f,d,!0,a)&&e,a.A||(e=jc(f,d,!1,a)&&e));
    if(b)for(h=0;
	     !a.A&&h<b.length;
	     h++)f=a.currentTarget=b[h],e=jc(f,d,!1,a)&&e;
    return e}
;

k.da=function(a,b,c,d){
    ic(this);
    return this.n.add(String(a),b,!1,c,d)}
;
k.V=function(a,b,c,d){
    return this.n.remove(String(a),b,c,d)}
;
var jc=function(a,b,c,d){
    b=a.n.i[String(b)];
    if(!b)return!0;
    b=Ea(b);
    for(var e=!0,f=0;
	f<b.length;
	++f){
	var h=b[f];
	if(h&&!h.v&&h.N==c){
	    var g=h.o,A=h.Q||h.src;
	    h.P&&Mb(a.n,h);
	    e=!1!==g.call(A,d)&&e}
    }
    return e&&!1!=d.ua}
;
O.prototype.K=function(a,b,c,d){
    return this.n.K(String(a),b,c,d)}
;
var ic=function(a){
    v(a.n,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")}
;
var kc=function(a){
    O.call(this);
    this.Y={
    }
    ;
    this.W={
    }
    ;
    this.G=new gc(this);
    this.q=a}
;
r(kc,O);
var lc=[D&&!G("11")?"readystatechange":"load","abort","error"];
kc.prototype.start=function(){
    var a=this.Y;
    Ba(Ka(a),function(b){
	var c=a[b];
	c&&(delete a[b],this.Z(c,b))}
       ,this)}
;

kc.prototype.Z=function(a,b){
    if(!this.va){
	var c;
	this.q?(c=this.q,c=(c?new fc(9==c.nodeType?c:c.ownerDocument||c.document):ha||(ha=new fc)).ib("img")):c=new Image;
	a.xa&&(c.crossOrigin=a.xa);
	this.G.da(c,lc,this.wa);
	this.W[b]=c;
	c.id=b;
	c.src=a.src}
}
;

kc.prototype.wa=function(a){
    var b=a.currentTarget;
    if(b){
	if("readystatechange"==a.type)if("complete"==b.readyState)a.type="load";
	else return;
	"undefined"==typeof b.naturalWidth&&("load"==a.type?(b.naturalWidth=b.width,b.naturalHeight=b.height):(b.naturalWidth=0,b.naturalHeight=0));
	this.dispatchEvent({
	    type:a.type,target:b}
			  );
	!this.va&&(a=b.id,delete this.Y[a],b=this.W[a])&&(delete this.W[a],this.G.V(b,lc,this.wa),La(this.W)&&La(this.Y)&&this.dispatchEvent("complete"))}
}
;
var mc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),oc=function(a){
    if(nc){
	nc=!1;
	var b=l.location;
	if(b){
	    var c=b.href;
	    if(c&&(c=(c=oc(c)[3]||null)&&decodeURIComponent(c))&&c!=b.hostname)throw nc=!0,Error();
	}
    }
    return a.match(mc)}
,nc=F;
var P=function(a,b){
    var c;
    if(a instanceof P)this.g=void 0!==b?b:a.g,pc(this,a.w),c=a.T,Q(this),this.T=c,c=a.I,Q(this),this.I=c,qc(this,a.S),c=a.J,Q(this),this.J=c,rc(this,a.p.F()),c=a.R,Q(this),this.R=c;
    else if(a&&(c=oc(String(a)))){
	this.g=!!b;
	pc(this,c[1]||"",!0);
	var d=c[2]||"";
	Q(this);
	this.T=d?decodeURIComponent(d):"";
	d=c[3]||"";
	Q(this);
	this.I=d?decodeURIComponent(d):"";
	qc(this,c[4]);
	d=c[5]||"";
	Q(this);
	this.J=d?decodeURIComponent(d):"";
	rc(this,c[6]||"",!0);
	c=c[7]||"";
	Q(this);
	this.R=c?decodeURIComponent(c):
	    ""}
    else this.g=!!b,this.p=new R(null,0,this.g)}
;
k=P.prototype;
k.w="";
k.T="";
k.I="";
k.S=null;
k.J="";
k.R="";
k.sb=!1;
k.g=!1;
k.toString=function(){
    var a=[],b=this.w;
    b&&a.push(sc(b,tc),":");
    if(b=this.I){
	a.push("//");
	var c=this.T;
	c&&a.push(sc(c,tc),"@");
	a.push(encodeURIComponent(String(b)));
	b=this.S;
	null!=b&&a.push(":",String(b))}
    if(b=this.J)this.I&&"/"!=b.charAt(0)&&a.push("/"),a.push(sc(b,"/"==b.charAt(0)?uc:vc));
    (b=this.p.toString())&&a.push("?",b);
    (b=this.R)&&a.push("#",sc(b,wc));
    return a.join("")}
;

k.F=function(){
    return new P(this)}
;
var pc=function(a,b,c){
    Q(a);
    a.w=c?b?decodeURIComponent(b):"":b;
    a.w&&(a.w=a.w.replace(/:$/,""))}
,qc=function(a,b){
    Q(a);
    if(b){
	b=Number(b);
	if(isNaN(b)||0>b)throw Error("Bad port number "+b);
	a.S=b}
    else a.S=null}
,xc=function(a){
    return a.J}
,rc=function(a,b,c){
    Q(a);
    b instanceof R?(a.p=b,a.p.fa(a.g)):(c||(b=sc(b,yc)),a.p=new R(b,0,a.g))}
,Q=function(a){
    if(a.sb)throw Error("Tried to modify a read-only Uri");
}
;
P.prototype.fa=function(a){
    this.g=a;
    this.p&&this.p.fa(a);
    return this}
;

var zc=function(a){
    return a instanceof P?a.F():new P(a,void 0)}
,sc=function(a,b){
    return p(a)?encodeURI(a).replace(b,Bc):null}
,Bc=function(a){
    a=a.charCodeAt(0);
    return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}
,tc=/[#\/\?@]/g,vc=/[\#\?:]/g,uc=/[\#\?]/g,yc=/[\#\?@]/g,wc=/#/g,R=function(a,b,c){
    this.h=a||null;
    this.g=!!c}
,T=function(a){
    if(!a.b&&(a.b=new y,a.f=0,a.h))for(var b=a.h.split("&"),c=0;
				       c<b.length;
				       c++){
	var d=b[c].indexOf("="),e=null,f=null;
	0<=d?(e=b[c].substring(0,d),f=b[c].substring(d+1)):
	    e=b[c];
	e=decodeURIComponent(e.replace(/\+/g," "));
	e=S(a,e);
	a.add(e,f?decodeURIComponent(f.replace(/\+/g," ")):"")}
}
;
k=R.prototype;
k.b=null;
k.f=null;
k.add=function(a,b){
    T(this);
    this.h=null;
    a=S(this,a);
    var c=this.b.get(a);
    c||this.b.set(a,c=[]);
    c.push(b);
    this.f++;
    return this}
;
k.remove=function(a){
    T(this);
    a=S(this,a);
    return this.b.H(a)?(this.h=null,this.f-=this.b.get(a).length,this.b.remove(a)):!1}
;
k.H=function(a){
    T(this);
    a=S(this,a);
    return this.b.H(a)}
;

k.u=function(){
    T(this);
    for(var a=this.b.l(),b=this.b.u(),c=[],d=0;
	d<b.length;
	d++)for(var e=a[d],f=0;
		f<e.length;
		f++)c.push(b[d]);
    return c}
;
k.l=function(a){
    T(this);
    var b=[];
    if(p(a))this.H(a)&&(b=Da(b,this.b.get(S(this,a))));
    else{
	a=this.b.l();
	for(var c=0;
	    c<a.length;
	    c++)b=Da(b,a[c])}
    return b}
;
k.set=function(a,b){
    T(this);
    this.h=null;
    a=S(this,a);
    this.H(a)&&(this.f-=this.b.get(a).length);
    this.b.set(a,[b]);
    this.f++;
    return this}
;
k.get=function(a,b){
    var c=a?this.l(a):[];
    return 0<c.length?String(c[0]):b}
;

k.toString=function(){
    if(this.h)return this.h;
    if(!this.b)return"";
    for(var a=[],b=this.b.u(),c=0;
	c<b.length;
	c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.l(d),f=0;
		f<d.length;
		f++){
	    var h=e;
	    ""!==d[f]&&(h+="="+encodeURIComponent(String(d[f])));
	    a.push(h)}
    return this.h=a.join("&")}
;
k.F=function(){
    var a=new R;
    a.h=this.h;
    this.b&&(a.b=this.b.F(),a.f=this.f);
    return a}
;
var S=function(a,b){
    var c=String(b);
    a.g&&(c=c.toLowerCase());
    return c}
;

R.prototype.fa=function(a){
    a&&!this.g&&(T(this),this.h=null,Qa(this.b,function(a,c){
	var d=c.toLowerCase();
	c!=d&&(this.remove(c),this.remove(d),0<a.length&&(this.h=null,this.b.set(S(this,d),Ea(a)),this.f+=a.length))}
					,this));
    this.g=a}
;
D&&G(8);
var Cc={
    wb:!0}
,U=function(){
    throw Error("Do not instantiate directly");
}
;
U.prototype.ga=null;
U.prototype.toString=function(){
    return this.content}
;
var Dc=function(a){
    if(null!=a)switch(a.ga){
    case 1:return 1;
    case -1:return-1;
    case 0:return 0}
    return null}
,Ec=function(){
    U.call(this)}
;
r(Ec,U);
Ec.prototype.Ca=Cc;
var W=function(a){
    return null!=a&&a.Ca===Cc?(v(a.constructor===Ec),a):V(String(String(a)).replace(Fc,Gc),Dc(a))}
,Hc=function(){
    U.call(this)}
;
r(Hc,U);
Hc.prototype.Ca={
    vb:!0}
;
var Ic=function(a){
    function b(){
    }
    b.prototype=a.prototype;
    return function(a,d){
	var e=new b;
	e.content=String(a);
	void 0!==d&&(e.ga=d);
	return e}
}
,V=Ic(Ec);
Ic(Hc);

(function(a){
    function b(){
    }
    b.prototype=a.prototype;
    return function(a,d){
	if(!String(a))return"";
	var e=new b;
	e.content=String(a);
	void 0!==d&&(e.ga=d);
	return e}
}
)(Ec);

var Jc=function(a){
    var b=4,c=!1;
    a=String(a);
    if(a.length<=b)return a;
    c&&(3<b?b-=3:c=!1);
    var d=a.charAt(b-1);
    if(d=55296<=d&&56319>=d)d=a.charAt(b),d=56320<=d&&57343>=d;
    d&&(b-=1);
    a=a.substring(0,b);
    c&&(a+="...");
    return a}
,Kc={
    "\x00":"&#0;",
    '"':"&quot;",
    "&":"&amp;",
    "'":"&#39;",
    "<":"&lt;",
    ">":"&gt;",
    "\t":"&#9;",
    "\n":"&#10;",
    "\x0B":"&#11;",
    "\f":"&#12;",
    "\r":"&#13;",
    " ":"&#32;",
    "-":"&#45;",
    "/":"&#47;",
    "=":"&#61;",
    "`":"&#96;",
    "\u0085":"&#133;",
    "\u00a0":"&#160;",
    "\u2028":"&#8232;",
    "\u2029":"&#8233;"
}
,Gc=function(a){
    return Kc[a]}
,
Fc=/[\x00\x22\x26\x27\x3c\x3e]/g;
var Lc=function(a){
    var b="";
    return b=a.media&&a.media.metadata&&a.media.metadata.title?b+("Now Casting: "+a.media.metadata.title):a.media?b+"Now Casting":b+"Ready To Cast"}
;
var Z=function(a){
    this.c=wb("castplayer.CastPlayer");
    Ab||(Ab=new xb);
    if(-1!=window.location.href.indexOf("Debug=true")){
	var b=Ab;
	if(!0!=b.ia){
	    var c;
	    vb();
	    c=ub;
	    var d=b.Fa;
	    c.C||(c.C=[]);
	    c.C.push(d);
	    b.ia=!0}
    }
	/[&?]Debug=true(&|$)/.test(window.location.search)&&(cast.player.api.setLoggerLevel(cast.player.api.LoggerLevel.DEBUG),cast.receiver.logger.setLevelValue(cast.receiver.LoggerLevel.DEBUG));
    this.j=a;
    this.j.className="gcpa";
    this.j.innerHTML=V('<div class="background"></div>'+
		       '<div class="gcpb"><video></video>'
		       ' <div class="logo"></div>' +
		       ' <div class="gcpr"></div>' +
		       ' <div class="splash"></div>' + 
		       ' <div class="watermark"></div>'
		       ' <div class="gcpc"></div>' + 
		       ' <div class="gcpd">' + 
		       '  <div class="gcph">' + 
		       '   <div class="gcpg"></div>' + 
		       '   <div class="gcpf"></div>' + 
		       '  </div>' + 
		       '  <div class="gcpk">' + 
		       '   <span class="gcpl"></span>' + 
		       '   <span class="gcpp"></span>' + 
		       '   <span class="gcpq"></span>' + 
		       '   <div class="gcpm">' + 
		       '    <div class="gcpn progressBar"></div>' + 
		       '    <div class="gcpo"></div>' + 
		       '   </div>' + 
		       '  </div>' + 
		       ' </div>' + 
		       '</div>' + 
		       '<div class="message"></div>');

    this.j.ownerDocument.addEventListener("webkitvisibilitychange",this.Ya.bind(this),!1);
    Mc(this,"unknown");
    X(this,"launching",!1);
    this.B=Y(this,"gcpb");
    this.D=Y(this,"message");
    this.ja=Y(this,"gcpn");
    this.ka=Y(this,"gcpo");
    this.Ga=Y(this,"gcpp");
    this.la=Y(this,"gcpq");
    this.a=this.j.querySelector("video");
    this.a.addEventListener("stalled",this.ma.bind(this),!1);
    this.a.addEventListener("waiting",this.ma.bind(this),!1);
    this.a.addEventListener("playing",this.Sa.bind(this),!1);
    this.a.addEventListener("pause",
			    this.Ra.bind(this),!1);
    this.a.addEventListener("ended",this.La.bind(this),!1);
    this.a.addEventListener("timeupdate",this.Ta.bind(this),!1);
    this.a.addEventListener("seeking",this.Wa.bind(this),!1);
    this.a.addEventListener("seeked",this.Va.bind(this),!1);
    this.a.addEventListener("loadedmetadata",this.Oa.bind(this),!1);
    this.s=cast.receiver.CastReceiverManager.getInstance();
    this.s.onReady=this.Ua.bind(this);
    this.s.setApplicationState(Lc({ }).toString());
    this.Ka=this.s.getCastMessageBus("urn:x-cast:com.google.cast.player.message",
				     cast.receiver.CastMessageBus.MessageType.JSON);
    this.Ka.onMessage=this.Qa.bind(this);
    this.e=new cast.receiver.MediaManager(this.a);
    this.Na=this.e.onLoad.bind(this.e);
    this.e.onLoad=this.Pa.bind(this);
    this.Ja=this.e.onStop.bind(this.e);
    this.e.onStop=this.Xa.bind(this);
    this.Ia=this.e.onLoadMetadataError.bind(this.e);
    this.e.onLoadMetadataError=this.L.bind(this);
    this.Ha=this.e.onError.bind(this.e);
    this.e.onError=this.Ma.bind(this)
}
var Nc=["castplayer","CastPlayer"];
var $=l;

Nc[0]in $||!$.execScript||$.execScript("var "+Nc[0]);
for(var Oc;
    Nc.length&&(Oc=Nc.shift());
   )Nc.length||void 0===Z?$=$[Oc]?$[Oc]:$[Oc]={
   }
:$[Oc]=Z;
var Pc={
    loading:3E5,paused:36E5,idle:3E5}
;
Z.prototype.getMediaElement=function(){
    return this.a}
;
Z.prototype.getMediaElement=Z.prototype.getMediaElement;
Z.prototype.rb=function(){
    return this.e}
;
Z.prototype.getMediaManager=Z.prototype.rb;
Z.prototype.start=function(){
    this.s.start()}
;
Z.prototype.start=Z.prototype.start;

Z.prototype.load=function(a){
    clearTimeout(this.na);
    var b=this,c=a.message.media||{
    }
    ,d=c.contentType,e=Qc(c);
    c.contentId?"unknown"==e?(this.c.log(pb,"Load failed: unknown content type: "+d,void 0),b.L(a)):Rc(c,function(){
	Sc(b.B,function(){
	    b.a.style.backgroundImage="none";
	    b.m&&(b.m.unload(),b.m=null);
	    Mc(b,e);
	    X(b,"loading",!1);
	    var d=Y(b,"gcpf"),h,g=c.metadata||{
	    }
	    ;
	    h=V;
	    g=g?1==g.metadataType?V((g.title?'<div class="gcpi">'+W(g.title)+"</div>":"")+(g.subtitle||g.studio||g.releaseDate?'<div class="gcpj">'+
											   (g.subtitle?"<div><span>"+W(g.subtitle)+"</span></div>":"")+(g.studio||g.releaseDate?"<div>"+(g.studio?"<span>"+W(g.studio)+"</span>":"")+(g.releaseDate?"<span>"+W(Jc(g.releaseDate))+"</span>":"")+"</div>":"")+"</div>":"")):2==g.metadataType?V((g.title?'<div class="gcpi">'+W(g.title)+"</div>":"")+(g.season||g.episode||g.seriesTitle||g.originalAirdate?'<div class="gcpj">'+(g.season||g.episode||g.originalAirdate?"<div>"+(g.season||g.episode?"<span>"+(g.season&&g.episode?"Season "+W(g.season)+", Episode "+
																																																																				W(g.episode):g.season?"Season "+W(g.season):g.episode?"Episode "+W(g.episode):"")+"</span>":"")+(g.originalAirdate?"<span>"+W(Jc(g.originalAirdate))+"</span>":"")+"</div>":"")+(g.seriesTitle?"<div><span>"+W(g.seriesTitle)+"</span></div>":"")+"</div>":"")):3==g.metadataType?V((g.title?'<div class="gcpi">'+W(g.title)+"</div>":"")+(g.artist||g.composer||g.albumName||g.albumArtist||g.releaseDate?'<div class="gcpj">'+(g.artist?"<div>"+(g.albumArtist?"<span>"+W(g.albumArtist)+"</span>":g.artist?"<span>"+
																																																																																																																										   W(g.artist)+"</span>":g.composer?"<span>"+W(g.composer)+"</span>":"")+"</div>":"")+(g.albumName||g.releaseDate?"<div>"+(g.albumName?"<span>"+W(g.albumName)+"</span>":"")+(g.releaseDate?"<span>"+W(Jc(g.releaseDate))+"</span>":"")+"</div>":"")+"</div>":"")):V((g.title?'<div class="gcpi">'+W(g.title)+"</div>":"")+(g.subtitle?'<div class="gcpj">'+W(g.subtitle)+"</div>":"")):"";
	    h=h(g);
	    d.innerHTML=h;
	    h=Tc(c);
	    d=Y(b,"gcpg");
	    h?(h=h.replace(/([\\"])/g,"\\$1"),d.style.backgroundImage='url("'+h+'")',d.classList.remove("placeholderImage")):
		(d.classList.add("placeholderImage"),d.style.removeProperty("background-image"));
	    "audio"==e?(v("audio"==b.M,"loadAudio called when type != AUDIO"),Uc(b,a)):"image"==e?b.Z(a):"video"==e?Vc(b,a):ua("Unknown player type")}
	  )}
												      ):(this.c.log(pb,"Load failed: no content",void 0),b.L(a))}
;
Z.prototype.load=Z.prototype.load;

Z.prototype.Z=function(a){
    v("image"==this.M,"loadImage called when type != IMAGE");
    var b=this,c=b.j.ownerDocument.createElement("img");
    c.onerror=b.L.bind(b,a);
    c.onload=function(){
	X(b,"paused",!1);
	b.a.style.backgroundImage="url("+c.src+")";
	b.e.sendLoadComplete()}
    ;
    c.src=a.message.media.contentId}
;

var Vc=function(a,b){
    v("video"==a.M,"loadVideo called when type != VIDEO");
    var c=null;
    var d=b.message.autoplay;
    var e=b.message.media.contentId;
    var f=b.message.media.contentType||"";
    var h=xc(zc(e))||"";
    if(u(h,".m3u8") || 
       0 == t(f,"application/x-mpegurl") || 
       0==t(f,"application/vnd.apple.mpegurl"))
	c=cast.player.api.CreateHlsStreamingProtocol;
    else if(u(h,".mpd") || 
	    0==t(f,"application/dash+xml"))
	c=cast.player.api.CreateDashStreamingProtocol;
    else if(-1!=h.indexOf(".ism")||
	    0==t(f,"application/vnd.ms-sstr+xml"))
	c=cast.player.api.CreateSmoothStreamingProtocol;

    c?(e=new cast.player.api.Host({
	url:e,mediaElement:a.a}),
       e.onError=function(){
	   a.m&&(a.m.unload(),a.m=null,a.a.dispatchEvent(new Event("error")))},
       a.a.autoplay=void 0==d?!0:d,
       a.m=new cast.player.api.Player(e),
       a.m.load(c(e),null)):Uc(a,b)}
var Uc=function(a,b){
    a.Na(new cast.receiver.MediaManager.Event(cast.receiver.MediaManager.EventType.LOAD,b.message,b.senderId));
}
var Wc=function(a,b){
    clearTimeout(a.na);
    b&&(a.na=setTimeout(a.pb.bind(a),b))}
var Mc=function(a,b){
    a.c.info("type changed: "+b);
    a.M=b;
    a.j.setAttribute("type", b);
    var c=Y(a,"gcpd");
    var d=Y(a,"watermark");
    clearInterval(a.hb);
    "audio"!=b?(c.removeAttribute("style"),
		d.removeAttribute("style")):a.hb=setInterval(function(){
		    c.style.marginBottom=Math.round(100*Math.random())+"px";
		    c.style.marginLeft=Math.round(600*Math.random())+"px";
		    d.style.marginBottom=Math.round(50*Math.random())+"px";
		    d.style.marginRight=Math.round(50*Math.random())+"px"},15E3)}
var X=function(a,b,c){
    c?Sc(a.B,function(){
	X(a,b,!1)}):
    (a.c.info("state changed: "+b),
     a.t=b,a.j.setAttribute("state",b),Xc(a),
     Wc(a,Pc[b]))}
var Xc=function(a){
    if(a.e){
	var b="idle"==a.t?null:a.e.getMediaInformation();
	b=Lc({media:b}).toString();
	a.jb!=b&&(a.jb=b,a.s.setApplicationState(b))}
};
k=Z.prototype;

k.Ua=function(){
    this.c.info("onReady");
    var a=this.s.getApplicationData(),b=Y(this,"logo"),c=window.getComputedStyle(b,null);
    "none"==c.backgroundImage&&(b.textContent=a.name);
    b=Y(this,"splash");
    "none"!=window.getComputedStyle(b,null).backgroundImage?Wc(this,3E3):(X(this,"idle",!1),"none"==c.backgroundImage?b.textContent=a.name:b.classList.add("logo"))}
;

k.Qa=function(a){
    this.c.info("onMessage");
    var b=3;
    a=a.data;
    this.D.className="message";
    p(a)?this.D.textContent=a:(b=a.timeout||b,this.D.textContent=a.message||"",a.className&&this.D.classList.add(a.className));
    clearTimeout(this.kb);
    this.kb=Yc(this.D,"gcpe",1E3*b)}
;
k.Ma=function(a){
    this.c.info("onError");
    var b=this;
    Sc(this.B,function(){
	X(b,"idle",!0);
	b.Ha(a)}
      )}
;
k.ma=function(){
    this.c.info("onBuffering");
    "playing"==this.t&&X(this,"buffering",!1)}
;

k.Sa=function(){
    this.c.info("onPlaying");
    var a="audio"==this.M;
    X(this,"playing","loading"==this.t&&!a)}
;
k.Ra=function(){
    this.c.info("onPause");
    var a="idle"==this.t,b=this.a.currentTime==this.a.duration;
    this.m&&this.m.getState().underflow?X(this,"buffering",!1):a||b||X(this,"paused",!1)}
;
k.Xa=function(a){
    this.c.info("onStop");
    var b=this;
    Sc(b.B,function(){
	X(b,"idle",!1);
	b.Ja(a)}
      )}
;
k.La=function(){
    this.c.info("onEnded");
    X(this,"idle",!0)}
;

k.Ta=function(){
    "buffering"==this.t&&X(this,"playing",!1);
    var a=this.a.currentTime;
    this.Ga.textContent=Zc(a);
    var b=this.a.duration;
    isFinite(b)&&(a=(100*a/b).toFixed(2)+"%",this.ja.style.width=a,this.ka.style.left=a)}
;
k.Wa=function(){
    this.c.info("onSeekStart");
    clearTimeout(this.ya);
    this.j.classList.add("gcps")}
;
k.Va=function(){
    this.c.info("onSeekEnd");
    clearTimeout(this.ya);
    this.ya=Yc(this.j,"gcps",3E3)}
;
k.Ya=function(){
    this.c.info("onVisibilityChange");
    document.webkitHidden&&(this.a.pause(),this.e.broadcastStatus(!1))}
;

k.pb=function(){
    this.c.info("onIdle");
    "idle"!=this.t?X(this,"idle",!0):window.close()}
;
k.Pa=function(a){
    this.c.info("onLoad");
    this.load(new cast.receiver.MediaManager.LoadInfo(a.data,a.senderId))}
;
k.L=function(a){
    this.c.info("onLoadError");
    var b=this;
    Sc(this.B,function(){
	X(b,"idle",!0);
	b.Ia(a)}
      )}
;

k.Oa=function(){
    this.c.info("onLoadSuccess");
    var a=this.a.duration;
    isFinite(a)?this.la.textContent=Zc(a):(this.la.textContent="",this.ja.style.width="100%",this.ka.style.left="100%");
    var b=this;
    b.a.autoplay&&(b.a.autoplay=!1,setTimeout(function(){
	b.a.play()}
					      ,2E3))}
;

var Y=function(a,b){
    var c=a.j.querySelector("."+b);
    if(c)return c;
    ua("Cannot find element with class: "+b)}
,Tc=function(a){
    return(a=(a.metadata||{
    }
	     ).images||[])&&a[0]&&a[0].url}
,Qc=function(a){
    var b=a.contentType||"";
    a=xc(zc(a.contentId||""))||"";
    return (ia(b,"audio/")?"audio":
	    ia(b,"image/")?"image":
	    ia(b,"video/")?"video":
	    0==t(b,"application/x-mpegurl")?"video":
	    0==t(b,"application/vnd.apple.mpegurl")?"video":
	    0==t(b,"application/dash+xml")?"video":
	    0==t(b,"application/vnd.ms-sstr+xml")?"video":
	    u(a,".mp3")?"audio":
	    u(a,".oga")?"audio":
	    u(a,".wav")?"audio":
	    u(a,".jpg")?"image":
	    u(a,".gif")?"image":
	    u(a,".png")?"image":
	    u(a,".mp4")?"video":
	    u(a,".ogv")?"video":
	    u(a,".webm")?"video":
	    u(a,".m3u8")?"video":
	    u(a,".mpd")?"video":
	    -1!=a.indexOf(".ism")?"video":"unknown";
	   }
    var Zc=function(a){
	a=Math.round(a);
	var b=Math.floor(a/3600),c=Math.floor(a/60)%60;
	a%=60;
	return b?ra(b)+":"+ra(c)+":"+ra(a):ra(c)+":"+ra(a);
    }
    var Yc=function(a,b,c){
	a.classList.add(b);
	return setTimeout(function(){a.classList.remove(b)},c);
    };
    var Sc=function(a,b){
	$c(a, function(){ b(); ad(a,"",void 0)});
    };
    var Rc=function(a,b){
	var c=[],d=Tc(a);
	d&&c.push(d);
	var d=a.contentId,e=Qc(a);
	d&&"image"==e&&c.push(d);
	if(0==c.length)b();
	else{
	    d=new kc;
	    Pb(d,"complete",b);
	    for(e=0;
		e<c.length;
		e++){
		var f=c[e];
		(f=p(f)?f:f.src)&&(d.Y[c[e]]={
		    src:f,xa:null}
				  )}
	    d.start()}
    };
    var $c=function(a,b){
	ad(a,0,b)}
    var ad=function(a,b,c){
	var d=function(){
	    a.style.webkitTransition="";
	    a.removeEventListener("webkitTransitionEnd",d,!1);
	    c&&c()
	};
	a.addEventListener("webkitTransitionEnd",d,!1);
	a.style.webkitTransition="opacity 0.75s";

	a.style.opacity=b};
    
location.search.slice(1).split("&").forEach(function(a){
    a=a.split("=");
    if("skin"==a[0]){
	var b=document.createElement("link");
	b.setAttribute("rel","stylesheet");
	b.setAttribute("type","text/css");
	b.setAttribute("href",unescape(a[1]));
	document.head.appendChild(b)}
}
					   );

